<?php

namespace Admin\Model;

use Think\Model\RelationModel;

class ArticleModel extends RelationModel
{//自动关联
    protected $_link = array(
        'category' => self::BELONGS_TO,
    );
    protected $_auto = array(
        array("time", 'unix', 3, 'callback'),
        array("file",'a',3,'callback'),

    );



    function unix($time)
    {
        return strtotime($time);
    }
    function a($file){
       return implode('|', $file);

    }


}

